﻿using XYTXL.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using System.Web.UI.WebControls;
using System.Text;
using System.Threading.Tasks;
namespace XYTXL.API
{

    #region 门户网站
    public class JH_MH_LMGLB : BaseEFDao<JH_MH_LMGL>
    {
    }
    public class JH_MH_XWGLB : BaseEFDao<JH_MH_XWGL>
    {
    }
    public class JH_MH_LJGLB : BaseEFDao<JH_MH_LJGL>
    {
    }
    public class JH_MH_RJGLB : BaseEFDao<JH_MH_RJGL>
    {
    }
    public class JH_MH_TZGGB : BaseEFDao<JH_MH_TZGG>
    {
    }
    public class JH_BJ_TZGGB : BaseEFDao<JH_BJ_TZGG>
    {
    }
    #endregion



    #region 问卷调查
    public class JH_WJ_WJGLB : BaseEFDao<JH_WJ_WJGL>
    {
    }
    public class JH_WJ_STGLB : BaseEFDao<JH_WJ_STGL>
    {
    }
    public class JH_WJ_XXGLB : BaseEFDao<JH_WJ_XXGL>
    {
    }
    public class JH_WJ_FKGLB : BaseEFDao<JH_WJ_FKGL>
    {
    }
    #endregion


    #region 校友通讯录

    public class xy_jzxmlbB : BaseEFDao<xy_jzxmlb>
    {
    }

    public class xy_bjB : BaseEFDao<xy_bj>
    {
        public string GetNJBN(string bjs)
        {
            StringBuilder strTree = new StringBuilder();

            var querynj = new xy_bjB().GetEntities(d => d.ID != 0).Select(d => d.nj).Distinct();
            foreach (int nj in querynj)
            {
                var querybj = new xy_bjB().GetEntities(d => d.nj.Value == nj);
                strTree.AppendFormat("{{id:'{0}',pId:'{1}',level:'{2}',name:'{3}',isuse:'{4}',icon:'{5}',{6},{7}}},", nj, nj, 1, nj, "Y", "", "checked:false", "open:false");
                foreach (var bj in querybj)
                {
                    strTree.AppendFormat("{{id:'{0}',pId:'{1}',level:'{2}',name:'{3}',isuse:'{4}',icon:'{5}',{6},{7}}},", bj.bh, nj, 2, bj.bj, "Y", "", bjs.SplitTOList(',').Contains(bj.bh) ? "checked:true" : "checked:false", "open:true");
                }
            }
            return strTree.Length > 0 ? strTree.ToString() : "";
        }



    }

    public class xy_actB : BaseEFDao<xy_act>
    {
    }

    public class xy_act_listB : BaseEFDao<xy_act_list>
    {
    }

    public class xy_corp_typeB : BaseEFDao<xy_corp_type>
    {
    }

    public class xy_ddhB : BaseEFDao<xy_ddh>
    {
    }

    public class xy_jzmxB : BaseEFDao<xy_jzmx>
    {
    }

    public class xy_studyB : BaseEFDao<xy_study>
    {
    }

    public class xy_workB : BaseEFDao<xy_work>
    {
    }

    public class xy_xbdmB : BaseEFDao<xy_xbdm>
    {

        public string GetXBByUser(string strUser)
        {
            string strBJ = "";
            string strSQL = "select xbdm,xbmc from xy_xbdm  where   ','+gluser+',' like '%," + strUser + ",%' order by xbmc";
            DataTable dt = new xy_xbdmB().GetDTByCommand(strSQL);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                strBJ = strBJ + dt.Rows[i]["xbmc"].ToString().Trim() + ",";
            }
            return strBJ;
        }

    }
    public class xy_xyhB : BaseEFDao<xy_xyh>
    {
    }

    public class xy_xl_typeB : BaseEFDao<xy_xl_type>
    {
    }

    public class xy_xsxxB : BaseEFDao<xy_xsxx>
    {
    }

    public class xy_zydmB : BaseEFDao<xy_zydm>
    {
    }


    public class xy_jhB : BaseEFDao<xy_jh>
    {
    }



    public class xy_gwlbB : BaseEFDao<xy_gwlb>
    {
    }

    public class tablenameB : BaseEFDao<tablename>
    {
    }

    public class tablename_tjxxB : BaseEFDao<tablename_tjxx>
    {
    }

    public class jh_BJ_TZGGB : BaseEFDao<JH_BJ_TZGG>
    {
    }
    
    #endregion




}